<html>
<head><meta charset="utf-8"><title>never type · edition 2021 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/index.html">edition 2021</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html">never type</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="226747570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226747570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226747570">(Feb 18 2021 at 00:07)</a>:</h4>
<p>I didn't see the never type mentioned in the edition planning spreadsheet, is there will there for making this an edition-related change?</p>



<a name="226747605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226747605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226747605">(Feb 18 2021 at 00:07)</a>:</h4>
<p>hmm</p>



<a name="226747608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226747608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226747608">(Feb 18 2021 at 00:07)</a>:</h4>
<p>the fallback, in particular?</p>



<a name="226747614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226747614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226747614">(Feb 18 2021 at 00:07)</a>:</h4>
<p>we totally could do that</p>



<a name="226747656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226747656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226747656">(Feb 18 2021 at 00:08)</a>:</h4>
<p>it's a bit hard for us to do a proper migration, but the impact is arguably small</p>



<a name="226747675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226747675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226747675">(Feb 18 2021 at 00:08)</a>:</h4>
<p>I had this hybrid idea I was decently happy with, but we could just gate it on the new edition</p>



<a name="226747682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226747682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226747682">(Feb 18 2021 at 00:08)</a>:</h4>
<p>I think that's a good catch, <span class="user-mention" data-user-id="256342">@bstrie</span></p>



<a name="226770025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226770025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226770025">(Feb 18 2021 at 06:21)</a>:</h4>
<p>Is the fallback change tied to stabilizing the type?</p>
<p>I'm interested here because the one breaking change with my <code>Try</code> prototype was in the compiler in a place that depended on <code>#![feature(never_type)]</code>, as far as I could tell.</p>



<a name="226990636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226990636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226990636">(Feb 19 2021 at 16:38)</a>:</h4>
<p><span class="user-mention" data-user-id="125270">@scottmcm</span> my proposal was not</p>



<a name="226990640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226990640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226990640">(Feb 19 2021 at 16:38)</a>:</h4>
<p>however</p>



<a name="226990652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226990652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226990652">(Feb 19 2021 at 16:38)</a>:</h4>
<p>there <em>was</em> significant breakage</p>



<a name="226990661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226990661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226990661">(Feb 19 2021 at 16:38)</a>:</h4>
<p>I have to go refresh my memory</p>



<a name="226990678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226990678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226990678">(Feb 19 2021 at 16:38)</a>:</h4>
<p>and tbqh I've always been uncomfortable changing the fallback</p>



<a name="226990698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226990698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226990698">(Feb 19 2021 at 16:38)</a>:</h4>
<p>except over an edition</p>



<a name="226990711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226990711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226990711">(Feb 19 2021 at 16:38)</a>:</h4>
<p>the arguments against it felt pretty weak to me</p>



<a name="226990750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/226990750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#226990750">(Feb 19 2021 at 16:38)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/268952-edition/topic/never.20type/near/226990652">said</a>:</p>
<blockquote>
<p>there <em>was</em> significant breakage</p>
</blockquote>
<p>it wasn't widespread, but there were some notable crates I think</p>



<a name="231417635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/231417635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#231417635">(Mar 23 2021 at 03:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/268952-edition-2021/topic/never.20type/near/226990678">said</a>:</p>
<blockquote>
<p>and tbqh I've always been uncomfortable changing the fallback except over an edition</p>
</blockquote>
<p>In the tracking doc I see that the never type fallback has been crossed out, what was the decision there? To proceed without any edition changes, or to continue postponing never type stabilization?</p>



<a name="231494004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/231494004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#231494004">(Mar 23 2021 at 15:52)</a>:</h4>
<p><span class="user-mention" data-user-id="256342">@bstrie</span> good question! <span class="user-mention" data-user-id="116122">@simulacrum</span> and I did some investigation, not sure if he wrote up our conclusions anywhere. The decision was that we will have to have some sort of fallback regardless for earlier editions, we can't do a change that is limited to just the new edition while keeping the fallback as <code>()</code> in the older edition, at least if we want to change the <code>Infallible</code> type to be an alias for <code>!</code>.</p>



<a name="231494042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/231494042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#231494042">(Mar 23 2021 at 15:52)</a>:</h4>
<p>Therefore, we can go ahead and do that change across all editions (including 2021)</p>



<a name="231494092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/231494092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#231494092">(Mar 23 2021 at 15:53)</a>:</h4>
<p>the main problem here is that the resulting fallback rules are more complicated than we would like</p>



<a name="231494123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/231494123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#231494123">(Mar 23 2021 at 15:53)</a>:</h4>
<p>so we can add lints that trigger when non-trivial fallbacks are occurring and warn you</p>



<a name="231494164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/231494164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#231494164">(Mar 23 2021 at 15:53)</a>:</h4>
<p>and when the next edition rolls around we may upgrade some of those lints to hard errors, or perhaps change the fallback system</p>



<a name="231494200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/231494200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#231494200">(Mar 23 2021 at 15:53)</a>:</h4>
<p>in part the problem is that we don't know what fallback system we would actually <em>want</em>, there isn't a perfect one yet</p>



<a name="231494218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/231494218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#231494218">(Mar 23 2021 at 15:53)</a>:</h4>
<p>I was hoping to write it up today</p>



<a name="236087856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/236087856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#236087856">(Apr 25 2021 at 19:34)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> Any free time to write up the current thinking on the never type? I added niko's current summary to <a href="https://github.com/rust-lang/rust/issues/35121">https://github.com/rust-lang/rust/issues/35121</a> . Also, perhaps this discussion should be moved into #lang</p>



<a name="236087883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/236087883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#236087883">(Apr 25 2021 at 19:35)</a>:</h4>
<p>Not sure what you mean - I don't think there's been further discussion since last lang update ~2 weeks ago</p>



<a name="236087901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/236087901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#236087901">(Apr 25 2021 at 19:35)</a>:</h4>
<p><a href="https://github.com/rust-lang/lang-team/issues/60#issuecomment-814509681">https://github.com/rust-lang/lang-team/issues/60#issuecomment-814509681</a></p>



<a name="236087909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/236087909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#236087909">(Apr 25 2021 at 19:35)</a>:</h4>
<p>it's still on my agenda</p>



<a name="236087912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/never%20type/near/236087912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/never.20type.html#236087912">(Apr 25 2021 at 19:35)</a>:</h4>
<p>ah I missed that, thanks</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>